import { API_CONFIG } from "../config/index.js";
import request from '../api/index.js'
// deployment操作
export const getDeploymentListHandler = (clusterId,namespace) => {
    return request(API_CONFIG.getDeploymentListApi, {clusterId,namespace}, "get", 2000)
}

export const deleteDeploymentHandler = (clusterId,namespace,name) => {
    return request(API_CONFIG.deleteDeploymentApi, {clusterId,namespace,name}, "post", 2000)
}

export const createDeploymentHandler = (data) => {
    return request(API_CONFIG.createDeploymentApi, data, "post", 2000)
}

export const updateDeploymentHandler = (data) => {
    return request(API_CONFIG.updateDeploymentApi, data, "post", 2000)
}

export const getDeploymentDetailHandler = (data) => {
    return request(API_CONFIG.getDeploymentApi, data, "get", 3000)
}

// 获取RS列表接口
export const getReplicaSetListHandler = (data) => {
    return request(API_CONFIG.getReplicaSetListApi, data, "get", 3000)
}